﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Celeriq.Common;

namespace Celeriq.Client.Interfaces
{
	public class ServiceStartup
	{
		private int _cacheLength = 0;

		/// <summary>
		/// The main data folder where repository caches reside
		/// </summary>
		public string RepositoryFolder { get; set; }

		/// <summary>
		/// The repository definition
		/// </summary>
		public RepositoryDefinition RepositoryDefinition { get; set; }

		/// <summary>
		/// The length in seconds to hold queries in cache
		/// Use 0 for no caching
		/// </summary>
		public int CacheLength
		{
			get { return _cacheLength; }
			set
			{
				if (value < 0) throw new Exception("The value cannot be less than zero.");
				_cacheLength = value;
			}
		}

	}
}
